In currently-adopted practice of compensating the semiconductor wafer distortions (prior to the exposure of the wafer in a lithographic exposure tool and/or processing the wafer otherwise), the tools used for fitting the measured distortion data include the so-called Enhanced Global Alignment basis functions (referred to hereinafter as the EGA basis functions). The EGA basis functions utilize six functions—x-shift, y-shift, x-magnification, y-magnification, rotation and orthogonality. The EGA basis functions have been adapted in wafer alignment and wafer-distortion related applications for a long time because they provide adequate least squares fitting. As precision requirements in lithography continue to increase, however, and as the wafer-distortion pattern-fitting requirements become tighter and tighter (for example, both in wafer-bonding and lithographic applications the absolute values of acceptable fitting errors are now drastically reduced and, in some cases, cannot amount to more than a minute fraction of a micron), EGA functions alone may no longer be adequate. Accordingly, there exists a need and motivation for the development of alternative functions providing practical advantage over the existing EGA set of functions to achieve better fitting results with robust and repeatable accuracy characterized by very small spatial errors.